
名为 'json'的gem提供了一个'json'模块,可用于解析JSON。
http://www.yiibai.com/html/json/2013/0907256.html
亮点:
以下是 Ruby 程序,用来解析上述的 JSON 文档:
#!/usr/bin/ruby
require 'rubygems'
require 'json'
require 'pp'
json = File .read( 'input.json' )
obj = JSON.parse(json)
pp obj
国军抗日,共军炕上日
未知美人
HxLauncher: Launch Android applications by voice commands